<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">
<h:head>

</h:head>

<h:body>
	<a4j:outputPanel ajaxRendered="true">
		<h:form rendered="#{usertab.tableRendered}">
			<div align="center"><rich:dataTable var="user"
				value="#{usertab.userTable}" style="width:80%"
				>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="UserName"></h:outputText>
					</f:facet>
					<h:outputText value="#{user.username}">

					</h:outputText>
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="Password"></h:outputText>
					</f:facet>
					<h:outputText value="#{user.password}">

					</h:outputText>
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="Role"></h:outputText>
					</f:facet>
					<h:outputText value="#{user.role}">
					</h:outputText>
				</rich:column>
				<rich:componentControl event="onrowclick" target="popup"
					operation="show" />
			</rich:dataTable></div>


			<rich:popupPanel id="popup" modal="false" autosized="true"
				resizeable="false">
				<a4j:commandLink actionListener="#{usertab.editUser}">
					<h:outputText value="Edit"></h:outputText>
				</a4j:commandLink>
			</rich:popupPanel>
			<rich:extendedDataTable></rich:extendedDataTable>
		</h:form>
	</a4j:outputPanel>
</h:body>
</html>
